The CxTrsEditor object contains the following methods:
The Connect method connects to a TRS.
Connect(DomainSiteService As String)
| Parameter | Required | Description |
|---|---|---|
|
DomainSiteService |
Yes |
The [Domain]Site.Service to which to connect. A domain is optional. The service must be a valid TRS. |
Example
The following example creates and connects the CxTrsEditor object.
|
Sub Dim TrsEditor Set TrsEditor = CreateObject("CxEditors.CxTrsEditor") TrsEditor.Connect("[5410]CYGDEMO.TRS") End Sub |
The Copy method launches a New Table Entry dialog box initialized with the information in the specified record.
Copy(QueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to copy. |
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a New Table Entry dialog box for entry "0" of table "COMSTATE."
|
Sub Dim iKey iKey = TrsEditor.Find("COMSTATE", "0") Dim iRet iRet= TrsEditor.Copy(iKey) MsgBox iRet End Sub |
The Delete method launches a Delete Entry dialog box initialized with the information in the specified record.
Delete(QueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to delete. |
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a Delete Entry dialog box for entry "0" of table "COMSTATE."
|
Sub Dim iKey iKey = TrsEditor.Find("COMSTATE", "0") Dim iRet iRet= TrsEditor.Delete(iKey) MsgBox iRet End Sub |
The Disconnect method disconnects from the connected TRS service.
Disconnect()
Example
The following example disconnects the TrsEditor object.
|
Sub TrsEditor.Disconnect End Sub |
The Edit method launches a Properties dialog box for the specified record.
Edit(QueueKey As String) As Integer
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to edit. |
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a property sheet for entry "0" of table "COMSTATE."
|
Sub Dim iKey iKey = TrsEditor.Find("COMSTATE", "0") Dim iRet iRet= TrsEditor.Edit(iKey) MsgBox iRet End Sub |
The Find method returns the database queue key by table name and table entry for the specified record.
Find(TableName As String, TableEntry As String) As String
| Parameter | Required | Description |
|---|---|---|
| TableName | Yes | The name of the table. |
| TableEntry | Yes | The name of the table entry. |
Example
The following example finds the database queue key for entry "0" of table "COMSTATE."
|
Sub Dim iKey iKey = TrsEditor.Find("COMSTATE", "0") MsgBox iKey End Sub |
The New method launches a New Table Entry dialog box.
New() As Integer
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a New Table Entry dialog box.
|
Sub Dim iRet iRet= TrsEditor.New MsgBox iRet End Sub |
The View method launches a Properties dialog box for the specified record.
View(Key as String, EditEnabled As Boolean) As Integer
| Parameter | Required | Description |
|---|---|---|
|
Key |
Yes |
The database queue key of the record to edit. |
| EditEnabled | Yes |
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |